﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsFormsMessageGlobal.Funcs;
using WindowsFormsMessageGlobal.UI;

namespace WindowsFormsMessageGlobal
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
        }

        private void buttonSendMessage_Click(object sender, EventArgs e)
        {
            MessageManager.Instance.SendMessage(new Funcs.Message { Content = DateTime.Now.Second.ToString()+" Hello World!" });
        }

        private void buttonNewForm1_Click(object sender, EventArgs e)
        {
            new Form1().Show();
        }

        private void buttonNewForm2_Click(object sender, EventArgs e)
        {
            new Form2().Show();
        }
    }
}
